package day20171122;

import com.mysql.cj.api.mysqla.result.Resultset;

import java.sql.*;

/**
 * Created by Administrator on 2017-11-22.
 */
public class Test {

    public static void main(String[] args) {

        // 加载驱动程序
        try {
            Class.forName("com.mysql.jdbc.Driver");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }

        // 1. Connection
        // 三个参数：
        // - 数据库连接字符串 jdbc:mysql://localhost:3306/test

        // - 数据库用户名
        // - 数据库密码
        try {
            Connection connection = DriverManager.getConnection(
                    "",
                    "",
                    ""
            );
        } catch (SQLException e) {
            e.printStackTrace();
        }

        // 2. Statement
        Statement statement = null;


        // 3. ResultSet
        ResultSet resultSet = null;


    }
}
